Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiffGenerator: fix removing schema from table name before applying regex filtering #1492

Open
wants to merge 2 commits into
base: 3.8.x
Choose a base branch
from

Conversation

cristi-contiu
Copy link
Contributor

@cristi-contiu cristi-contiu commented Feb 27, 2025

Q A
Type bug
Fixed issues #1487

Summary

Failing test and suggested fix for #1487, requested in #1490 (review)

There are differences in the way Migrations and DBAL apply the SchemaAssetsFilter, usually regex: DBAL applies it on the table name (which can be qualified or unqualified, depending on platform schema support and if the table is in the default search-path schema) while Migrations always removes the schema and only applies the filter on the unqualified table name (my_table).

This fix applies the SchemaAssetsFilter on the table name exactly as provided by the DBAL for platforms that support schema.

@cristi-contiu cristi-contiu marked this pull request as ready for review February 27, 2025 22:03
@cristi-contiu cristi-contiu changed the title DiffGenerator: failing test for applying DBAL SchemaAssetsFilter on to schema DiffGenerator: failing test for applying DBAL SchemaAssetsFilter on mappings schema Feb 27, 2025
@cristi-contiu cristi-contiu force-pushed the issue-1487 branch 3 times, most recently from 4ab7e80 to a938f5f Compare February 28, 2025 06:13
@cristi-contiu cristi-contiu changed the title DiffGenerator: failing test for applying DBAL SchemaAssetsFilter on mappings schema DiffGenerator: fix applying DBAL SchemaAssetsFilter on platforms with schemas support Feb 28, 2025
@cristi-contiu cristi-contiu changed the title DiffGenerator: fix applying DBAL SchemaAssetsFilter on platforms with schemas support DiffGenerator: fix removing schema from table name before applying regex filtering Feb 28, 2025
if ($this->platform->supportsSchemas()) {
return $name;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After your change, I don't think the phpdoc comment is accurate anymore. Also, if the platform does not support schémas, surely the dot in a name should be interpreted literally? So... this method is no longer needed maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants